package com.common.constants;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * 系统常量
 */
public class Constants {

    public static final String STRING_0 = "0";

    public static final String ON = "ON";

    public static final String OFF = "OFF";

    public static final String YES = "YES";

    public static final String NO = "NO";

    public static final String SIGN_KEY = "sign_key";

    public static final String CALLBACK_URL = "callback_url";

    public static final String DEFAULT_DATETIME_FULL_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String DEFAULT_DATETIME_FORMAT = "yyyy-MM-dd HH:mm";
    public static final String YEAR_FORMAT = "yyyy";
    public static final String YEAR_MONTH_FORMAT = "yyyy-MM";
    public static final String YEAR_MONTH_DAY_FORMAT = "yyyy-MM-dd";
    public static final String YEAR_MONTH_DAY_FORMAT_DOT = "yyyy.MM.dd"; // 年/月/日
    public static final String DAY_FORMAT = "dd";
    public static final String HOUR_MINUTE_SECOND_FORMAT = "HH:mm:ss";
    public static final String TIME_FORMAT = "HH:mm";
    public static final String CN_DATE_FORMAT = "yyyy年MM月dd日";
    public static final String PURE_YEAR_FORMAT = "yyyy";
    public static final String PURE_MONTH_FORMAT = "yyyyMM";
    public static final String PURE_DAY_FORMAT = "yyyyMMdd";
    public static final String PURE_DAYTIME_FORMAT = "yyyyMMddhhmmss";
    public static final String END_DATE = "2099-12-31 23:59:59";
    public static final String SELF_TYPE = "0";
    public static final String PPV_TYPE = "1";
    public static final String CHARSET_UTF8 = "UTF-8";
    public static final String SIGN_TYPE_RSA = "RSA";
    public static final String SIGN_ALGORITHMS = "SHA1WithRSA";
    /**
     * 用户正常状态
     */
    public static final Integer USER_STATUS_NORMAL = 0;

    /**
     * 用户禁用状态
     */
    public static final Integer USER_STATUS_LOCK = -1;

    /**
     * 普通用户
     */
    public static final Integer USER_TYPE_NORMAL = 0;

    /**
     * 管理员
     */
    public static final Integer USER_TYPE_ADMIN = 1;

    /**
     * 性别男
     */
    public static final Integer SEX_WOMAN = 1;


    /**
     * 性别女
     */
    public static final Integer SEX_MAN = 0;

    /**
     * 性别保密
     */
    public static final Integer SEX_SECRET = 2;

    /**
     * 正常状态
     */
    public static final Integer STATUS_NORMAL = 0;

    /**
     * 禁用状态
     */
    public static final Integer STATUS_DISABLE = -1;

    /**
     * 删除标志
     */
    public static final Integer DEL_FLAG = 1;

    /**
     * 限流标识
     */
    public static final String LIMIT_ALL = "LIMIT_ALL";

    /**
     * 页面类型权限
     */
    public static final Integer PERMISSION_PAGE = 0;

    /**
     * 操作类型权限
     */
    public static final Integer PERMISSION_OPERATION = 1;

    /**
     * 1级菜单
     */
    public static final Integer LEVEL_ONE = 1;

    /**
     * 2级菜单
     */
    public static final Integer LEVEL_TWO = 2;

    /**
     * 3级菜单
     */
    public static final Integer LEVEL_THREE = 3;


    /**
     * 创建者数据库列名
     */
    public static final String CREATE_BY_COL_NAME = "createBy";

    /**
     * 创建者数据库列名
     */
    public static final String UPDATE_BY_COL_NAME = "updateBy";

    public static final String JWT_KEY_USER_ID = "userId";
    public static final String JWT_KEY_NAME = "name";
    public static final String ACCESS_TOKEN = "token";
    public static final String REFRESH_TOKEN = "refreshToken";

    public static final String User = "User";


    public static final Integer IS3D = 1;
    public static final Integer NO3D = 0;


    public static final Integer ISPREVIEW = 1;
    public static final Integer NOPREVIEW = 0;


    public static final String TRAN_STATUS_INIT = "INIT";
    public static final String TRAN_STATUS_SUCCESS = "SUCCESS";
    public static final String TRAN_STATUS_ING = "TRANING";
    public static final String TRAN_STATUS_FAIL = "FAIL";

    public static final String FILEMOVEURL = "file.move.url";
    public static final String INJECTURL = "inject.url";
    public static final String DOWNZIPURL = "inject.downzip.url";
    public static final String DOWNC2FILEURL = "inject.c2file.url";
    public static final String DOWN_FILE_URL = "inject.file.url";


    public static final String SPLIT_ = "_";
    public static final String COMMA = ",";

    public static final String QUOT_TRAN = "&quot;";

    public static final String QUOT = "\"";

    public static final String BASEING = "baseing";


    public static final String VALID = "valid";

    public static final String INVALID = "invalid";

    public static final String ASC = "asc";
    public static final String DESC = "desc";
    public static final String INIT_PASSWORD = "initPassword";


    public static final String UPLOAD_PATH = "uploadPath";
    public static final String CHECK_RANK = "checkRank";
    public static final String CHECK_ORDER = "checkOrder";
    public static final String CHECK_CIVIL = "checkCivil";
    public static final String CHART_RANK_LIMIT = "chartRankLimit";

    public static final Integer CHART_RANK_DEFAULT_LIMIT = 20;
    public static final String CASE_TYPE = "caseType";


    public static final String CASE_UNIT = "caseUnit";
    public static final String CASE_STATUS = "caseStatus";
    public static final String CASE_CURRENT_STAGE = "caseCurrentStage";
    public static final String ALL_FILL_FORM_ROLES = "all_fill_form";
    public static final String ALL_RISK_QUALITY_FLOW_FORM_ROLES = "all_risk_quality_flow_form";
    public static final String PROBLEM = "problem";
    public static final String SITUATION = "situation";

    public static final HashSet QUALITY_FLOW_SET = new HashSet(Arrays.asList("quality", "flow"));

    public static final HashSet FILL_JUDICIAL_CHECK_SUPER_TYPE_SET = new HashSet(Arrays.asList("效果", "效率"));

    public static final String CASE_INDEX_MAPPING_MAP = "case_type_index_mapping";
    public static final String CASE_INDEX_JUDICIAL_TYPE = "case_index_judicial_type";
    public static final String CASE_END = "办结案件";

}

